﻿using System.Collections.Generic;
using System.Linq;

namespace DDDSample.Domain.HandlingEvent
{
    public class HandlingHistory
    {
        private readonly IList<HandlingEvent> _events;

        public HandlingHistory(IEnumerable<HandlingEvent> events)
        {
            _events = new List<HandlingEvent>(events);
        }

        public virtual IEnumerable<HandlingEvent> EventsByCompletionTime
        {
            get { return _events.OrderBy(x => x.CompletionDate); }
        }
    }
}